package com.cqndt.disaster.device.util;

import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper=true)
public class ServiceException extends RuntimeException {
	private static final long serialVersionUID = -6443194948791982893L;

	private int errCode;

    private String errMsg;

    public ServiceException(ErrorType errorType){
        this.errCode = errorType.getCode();
        this.errMsg = errorType.getErrorMsg();
    }
    public int getErrCode() {
        return errCode;
    }
    public void setErrCode(int errCode) {
        this.errCode = errCode;
    }
    public String getErrMsg() {
        return errMsg;
    }
    public void setErrMsg(String errMsg) {
        this.errMsg = errMsg;
    }
}